Contents of this archive

Directories:
exportFig contains functions to make pretty figures
plasmids contains genbank (ApE) files
seg contains routines to segment microscopy images
segResultsHysteresisCombined contains results of segmentation to generate data for the first hysteresis figure
redo fig3 contains data and scripts Figure 3, tunable boundaries
latchData contains data for the set-reset latch
timeCourse contains data/scripts for Supp Fig 2
newSwitch contains data and scripts for Supp Fig 5

The following files are used to fit the parameters numerically, as described in the SI:
findParamsUsingFourBoundaries.m is the driver
-calls calcDiffforParamsForFourBoundaries.m to fit beta, kappa, the conversation ratio from arabinose induction to y, and alpha to corresponds to 0.5e-2 uM aTc
-then uses calcDiffForAtcLeakage.m to to determine value of alpha at 0 aTc from Ptet leakage

makeFirstHysteresisFigure.m plots the first hysteresis figure (no extra sigma factor induction from Ptet)
-Uses zvi_plot09150917.m to overlay experimental data
-uses makeHysteresisCurve.m to generate model curve

makeBifurcationDiagramusingfastmethod.m generates bifurcation curve used in Fig 3 when extra sigma factor production is provided via Ptet

makeFig3Latchcloseups.m produces the plots used for the set-reset latch

The following files illustrate the image processing:
zvi_segmentAndProcess first calls the segmentation routine on all ZVI files and then processes them
zvi_SegmentImages.m performs the segmentation on phase contrast images and then saves results
zvi_processSegmentedImages.m loads the files previously saved on segmentation results to compute fluoresence for each cell
-also subtracts background fluoresence around each cell
zvi_processRealtime.m provides an example of how I would process an input directory containing subdirectories with ZVI files
